package com.project.fortuneteller.mappers;

import com.project.fortuneteller.pojo.Book;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * 书籍的增删改查操作
 */
@Mapper
public interface LearnBookMapper {

    @Select("select * from learn_book where id= #{id}")
    Book selectById(String id);

    @Select("select id from learn_book where book_name = #{name}")
    String selectIdByName(@Param("name")  String name);
}
